.#{$progress-prefix-cls} {
  display: inline-block;

  font-size: $font-size-small;
  position: relative;

  width: 100%;

  &-vertical {
    height: 100%;
    width: auto;
  }

  &-outer {
    display: inline-block;
    margin-right: 0;
    padding-right: 0;
    width: 100%;

    .#{$progress-prefix-cls}-show-info & {
      margin-right: -55px;
      padding-right: 55px;
    }
  }

  &-vertical &-outer {
    height: 100%;
    width: auto;
  }

  &-inner {
    background-color: #f3f3f3;
    border-radius: 100px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    width: 100%;

    &-text {
      color: #fff;
      display: inline-block;
      font-size: 12px;
      margin: 0 6px;
      vertical-align: middle;
    }
  }

  &-vertical &-inner {
    height: 100%;
    width: auto;

    & > *,
    &::after {
      display: inline-block;
      vertical-align: bottom;
    }

    &::after {
      content: '';
      height: 100%;
    }
  }

  &-bg {
    background-color: $primary-color;
    border-radius: 100px;
    position: relative;
    text-align: right;
    transition: all $transition-time linear;

    &::after {
      content: '';
      display: inline-block;
      height: 100%;
      vertical-align: middle;
    }
  }

  &-success-bg {
    background-color: $success-color;
    border-radius: 100px;
    left: 0;
    position: absolute;
    top: 0;
    transition: all $transition-time linear;
  }

  &-text {
    color: $subsidiary-color;
    display: inline-block;
    font-size: 1em;
    margin-left: 5px;
    text-align: left;
    vertical-align: middle;
  }

  &-active {
    .#{$progress-prefix-cls}-bg:before {
      animation: ivu-progress-active 2s $ease-in-out infinite;
      background: #fff;
      border-radius: 10px;
      bottom: 0;
      content: '';
      left: 0;
      opacity: 0;
      position: absolute;
      right: 0;
      top: 0;
    }
  }

  &-vertical &-active {
    .#{$progress-prefix-cls}-bg:before {
      animation: ivu-progress-active-vertical 2s $ease-in-out infinite;
      top: auto;
    }
  }

  &-wrong {
    .#{$progress-prefix-cls}-bg {
      background-color: $error-color;
    }
    .#{$progress-prefix-cls}-text {
      color: $error-color;
    }
  }

  &-success {
    .#{$progress-prefix-cls}-bg {
      background-color: $success-color;
    }
    .#{$progress-prefix-cls}-text {
      color: $success-color;
    }
  }
}

@keyframes ivu-progress-active {
  0% {
    opacity: 0.3;
    width: 0;
  }

  100% {
    opacity: 0;
    width: 100%;
  }
}

@keyframes ivu-progress-active-vertical {
  0% {
    height: 0;
    opacity: 0.3;
  }

  100% {
    height: 100%;
    opacity: 0;
  }
}
